import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
import myConfig from '@/myConfig.js';
import safeHightBox from '@/components/safeHightBox/safeHightBox.vue';
import search from '@/components/search/search.vue';
import roundNode from '@/components/roundNode/roundNode.vue';
import orderItem from '@/components/orderItem/orderItem.vue';
import orderInfo from '@/components/orderInfo/orderInfo.vue';
Vue.component('safe-hight-box',safeHightBox);
Vue.component('search',search);
Vue.component('round-node',roundNode);
Vue.component('order-item',orderItem);
Vue.component('order-info',orderInfo);
Vue.config.productionTip = false
/*返回上一页*/
Vue.prototype.goBack = () => {
	uni.navigateBack({
		delta: 1
	})
}
/*去页面*/
Vue.prototype.goTo = (url)=>{
	uni.navigateTo({
		url
	})
}
Vue.prototype.redirectTo = (url)=>{
	uni.redirectTo({
		url
	})
}
Vue.prototype.switchTab = (url)=>{
	uni.switchTab({
		url
	})
}
// 接口fail
Vue.prototype.apiFail = function(){
	uni.showToast({
		title:'出错了，请稍后再试',
		icon:'none',
		duration:1200
	});
}
//全局变量
Vue.prototype.myConfig = myConfig;


App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
